<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<c:set var="ctxStatic" value="${pageContext.request.contextPath}/static" />
<!DOCTYPE html>
<html> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > 
    <title>店铺首页</title> 
    <meta name="viewport" content="height = device-height, width=device-width, initial-scale=1, user-scalable=no">
    <link href="${ctxStatic}/jqmobile/jquery.mobile-1.4.3/jquery.mobile-1.4.3.min.css" rel="stylesheet"> 
		<link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-base.css">
        <link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-box.css">
        <link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-color.css">
		<link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-res.css">
		<link rel="stylesheet" href="${ctxStatic}/kaka/css/ui-style.css">
		<link rel="stylesheet" href="${ctxStatic}/kaka/css/layout.css">
    
	<script src="${ctxStatic}/jquery/1.11.1/jquery-1.11.1.min.js"></script>
	<script src="${ctxStatic}/jqmobile/jquery.mobile-1.4.3/jquery.mobile-1.4.3.min.js"></script>	
	<style type="text/css">
	  .textBlue{
	color:#02869e
}
.textG{
	font-size:1em;
}

.sList .percent{
	width:20%;
	display:block;
	float:left;
	font-size:1.0em;
}
.sList .percent .textBlue{
	font-size:1.0em;
	color:#02869e;
}
	</style>
</head>
<body class="um-vp bg-gray" ontouchstart>
<div data-role="page" data-theme="none">
        <div id="page_0"  tabindex="0">
            <!--header开始-->
           <<div id="header" class="uh c-m3 t-wh headerbg">
                <h1 class="hbg ulev0 ut-s tx-c headerPo" tabindex="0"><a class="btnBack" href="#popupMenu" data-rel="popup" data-transition="pop"></a><a href="#popupMenu" data-rel="popup" data-transition="pop"><span   id="headtitle" style="color: white;">卡卡足迹</span></a><a class="textReport" href="#popupMenu" data-rel="popup" data-transition="pop">建议</a></h1>
            </div>
           
			<!--content开始-->
			<input type="hidden" value="${shopid}" name="shopid" id="shopid">
			<input type="hidden" value="${openid}" name="openid" id="openid">
			<input type="hidden" value="${serverUrl}" name="serverurl" id="serverurl">
            <div id="content"  class="contentE">
			    <div class="shopView">
                	<a href="#popupMenu" data-rel="popup" data-transition="pop">
                	<c:choose>
                	<c:when test="${shop.head_image eq null or shop.head_image eq '无' }">
                	<div class="shopPic"><img src="${ctx}/images/logo_kaka.png"></div>
                	</c:when>
                	<c:otherwise>
                		<div class="shopPic"><img src="${serverUrl}${shop.head_image}"></div>
                		</c:otherwise>
                	</c:choose>	
						<div class="shopInfo">
							<ul class="infoList">
								<li class="tittle">${shop.shop_name}<c:if test="${shop.shop_name eq null}">无</c:if></li>
								<li class="text_info">${shop.address}<c:if test="${shop.address eq null}">无</c:if></li>
							</ul>
							
						</div></a>
                	<%-- <a href="/report/${shopid}" class="textReport">举报</a> --%>
                </div>
				<div class="shopPicBox">
                	<c:choose>
                	<c:when test="${shopImage.file_name eq null or shopImage.file_name eq '无'}">
                	<img src="${ctx}/images/shop01.jpg">
                	</c:when>
                	<c:otherwise>
                		<img src="${serverUrl}${shopImage.file_name}">
                		</c:otherwise>
                	</c:choose>	
                	
					<div class="introBox">
						<p class="praise" id="que">${shop.total_count}<c:if test="${shop.total_count eq null}">0</c:if>个赞</p>
						<ul class="social">
					<c:choose>
 					<c:when test="${praise.enabled eq '关闭'}"></c:when>
 					<c:otherwise>
							 <li><a class="praise" id="zan" href="#popupMenu" data-rel="popup" data-transition="pop"></a></li>
					</c:otherwise>
					</c:choose>
					<c:choose>
					<c:when test="${share.enabled eq '关闭'}"></c:when>
					<c:otherwise>
							 <li><a class="share" href="#popupMenu" data-rel="popup" data-transition="pop"></a></li>
					</c:otherwise>
					</c:choose>							 
						</ul>
					</div>
					
				</div>
				<div class="shopInfoArea">
					<div class="sList" >
						<a href="#popupMenu" data-rel="popup" data-transition="pop">
							 <ul class="kaPrint">
							 	  <li>可用卡点：<span class="textO">无</span></li>
								  <li>最近足迹：本店暂无您的足迹</li>
						     </ul>
							 <span class="iconGo"></span>
						</a>
					</div>
					<div class="clear10"></div>
					<div class="borderTop">
					 <c:if test="${message ne null}"><font style="margin-left: 15px;">${message}</font></c:if> 
					<c:forEach items="${rules}" var="po">
					<div class="sList" >
						<a href="#popupMenu" data-rel="popup" data-transition="pop">
							 <ul class="kaPrint">
							 	  <li><span class="iconLeftgo"></span>${po.point_count}个卡点兑换${po.exchange_content}</li>
						     </ul>
							 <span class="iconGoB"></span>
						</a>
					</div>
					</c:forEach>
					</div>
				<c:choose>
 					<c:when test="${praise.enabled eq '关闭' and share.enabled eq '关闭'}"></c:when>
 					<c:otherwise><div class="clear10"></div></c:otherwise>
 					</c:choose>	
 					<c:choose>
 					<c:when test="${praise.enabled eq '关闭'}"></c:when>
 					<c:otherwise>
 					
					<div class="sList borderTop">
						 <a href="#popupMenu" data-rel="popup" data-transition="pop">
						    <p class="kaSa"><span class="iconPraise"></span><span class="textG">点赞<span class="textBlue">${praise.total_count}<c:if test="${praise.total_count eq null}">几</c:if></span>次，赠送<span class="textBlue">${praise.presenter_count}<c:if test="${praise.presenter_count eq null}">几</c:if></span>个卡点</span></p>
							<span class="percent"><span class="textBlue">${us.point_praise_count}<c:if test="${us.point_praise_count eq null}">0</c:if>/</span>${praise.total_count}<c:if test="${praise.total_count eq null}">0</c:if></span> 
							<span class="iconGoB"></span>
						 </a>
					</div>	
					</c:otherwise>
					</c:choose>
					<c:choose>
					<c:when test="${share.enabled eq '关闭'}"></c:when>
					<c:otherwise>
					<div class="sList">
						 <a href="#popupMenu" data-rel="popup" data-transition="pop"><!-- href="#popupMenu" data-rel="popup" data-transition="pop" -->
						    <p class="kaSa"><span class="iconShare"></span><span class="textG">分享<span class="textBlue">${share.total_count}<c:if test="${share.total_count eq null}">几</c:if></span>次，赠送<span class="textBlue">${share.presenter_count}<c:if test="${share.presenter_count eq null}">几</c:if></span>个卡点</span></p>
							<span class="percent"><span class="textBlue">${us.share_count}<c:if test="${us.share_count eq null}">0</c:if>/</span>${share.total_count}<c:if test="${share.total_count eq null}">0</c:if></span> 
							<span class="iconGoB"></span>
						 </a>
					</div>	
					</c:otherwise>
					</c:choose>
					<div class="clear10"></div>
					<c:forEach items="${shopImages}" var="sis">
					<div class="shopPicArea">
						<p>${sis.description}</p>
					</div>
						<div class="shopPicBox">
						<img src="${serverUrl}${sis.file_name}">
						</div>
						</c:forEach>					
				</div>
            </div>
            <!--content结束-->
			<!--footer开始-->
            <div id="footer" class="uf c-m2 c-bla t-wh">
            </div>
            <!--footer结束-->
        </div>
<div data-role="popup" id="popupCloseRight" data-theme="b">
        <ul data-role="listview" data-inset="true" style="width: 180px;">
            <li data-role="list-divider">您只需关注“卡卡足迹”，搜索“${shop.shop_name}”即可</li>
        </ul>
</div>
<div data-role="popup" id="popupMenu" class="ui-content" data-theme="b" style="max-width:280px">
    <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
<p>您只需关注“卡卡足迹”公众号，扫描“${shop.shop_name}”二维码，即可获得卡点，兑换饮料。</p>
</div>
</div>
</body> 
</html>